/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


(function( $ ) {
  $.fn.translate = function(l) {
      if($(this).is("input")){
         var dat = this.val();
         var a = $(this);
         $.post("DoTranslation",{data:dat, lan:l},function(result){
          
          a.val(result);
          
  }); 
      }
      else{
      var dat = this.html();
      var a = $(this);
      $.post("DoTranslation",{data:dat, lan:l},function(result){
          
          a.text(result);
          
  });
  }
  };
})( jQuery );